/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.pehulja.mmdo.coursework.math.checkingResults;

import com.pehulja.mmdo.coursework.math.SimplexTable;
import com.pehulja.mmdo.coursework.math.Solver;
import com.pehulja.mmdo.coursework.math.matrix.Matrix;
import com.pehulja.mmdo.coursework.math.matrix.MatrixMathematics;
import com.pehulja.mmdo.coursework.math.matrix.NoSquareException;
import org.apache.commons.math.linear.RealMatrix;

/**
 *
 * @author pehulja
 */
public class AdmissibilityChecking {
    private Solver solver;
    private double [] plan;
    
    public AdmissibilityChecking(Solver solver) {
        this.solver = solver;
        plan = this.solver.getValuesOptimalResultPlanBasicComponentsExtended();
    }
    public boolean checkingForTheAdmissibility(){
        boolean flag = false;
        if(plan != null && plan.length!=0){
            flag = true;
            for(double i:plan){
                if(i<0){
                    flag = false;
                    break;
                }
            }
        }
        return flag;
    }
}
